package cn.laixueit.resource.blog.service;

import cn.laixueit.po.TbBook;
import cn.laixueit.po.TbBookChapter;
import cn.laixueit.po.TbBookChapterContent;
import cn.laixueit.vo.BookVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Set;

/**
 *
 */
public interface TbBookService extends IService<TbBook> {

    Page<BookVo> bookPage(Integer page, Integer size, BookVo bookVo);
    HashMap<String,Object> save(BookVo bookVo);
    Boolean  remove(String id,Boolean isDelete);
    BookVo findById(String id);
    BookVo findBookAndChapters(String id);
    HashMap<String,Object> saveChapter(TbBookChapter chapter);
    List<TbBookChapter> listChapter(String bookId);
    Boolean removeChapter(String chapterId);
    TbBookChapterContent findChapterContent(String chapterId);
    Boolean saveChapterContent(TbBookChapterContent chapterContent);
    List<TbBookChapter> findChapters(String bookId);
    List<HashMap> findBookCategoryNames(BookVo bookVo);
    LinkedHashMap<String, Set<String>> findBookDate(BookVo bookVo);
    List<TbBook> randHotBook();
}
